///**
// *  * Bestpay.com.cn Inc.
// *  * Copyright (c) 2011-2017 All Rights Reserved.
// *  
// */
//package kafkaPC;
//
//import TestClass.kafkaTest;
//import com.bestpay.kafka.model.ProducerType;
//import com.bestpay.kafka.model.RequiredAck;
//import com.bestpay.kafka.model.TopicInfo;
//import com.bestpay.kafka.service.producer.ProducerServiceImpl;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Service;
//
//import javax.annotation.Resource;
//
///**
//  * 
//  * @author yedengfeng
//  * @version Id: kafkaProducer.java, v 0.1 2017/5/19 17:32 yedengfeng Exp $$
//  */
//@Slf4j
//@Service
//public class KafkaProducer {
//
//
//    @Value(value = "${zookeeper.url}")
//    private String zookeeperUrl;
//
//    private String groupName="test";
//
////    @Value(value = "${kafka.fas.topicname}")
////    private  String topicName;
//
//    @Value(value = "${kafka.url}")
//    private String kafkaUrl;
//
//    private TopicInfo topicInfo;
//
//    private String TopicName = "TestP";
//
//    @Resource
//    private ProducerServiceImpl producerService;
//
//    public void setPropertiesSet() {
//        topicInfo = new TopicInfo();
////        topicInfo.setGroupName(groupName);
//        topicInfo.setTopicName(TopicName);
//        topicInfo.setZkAddress(zookeeperUrl);
//        topicInfo.setBrokerList(kafkaUrl);
//        topicInfo.setSyncFlag(ProducerType.SYNC);
//        topicInfo.setAck(RequiredAck.LEADER_ACK);
//        topicInfo.setRetries(true);
//    }
//
//
//
//    public void send() {
//        kafkaTest kafkaTest = new kafkaTest();
//        kafkaTest.setNumber("1");
//        setPropertiesSet();
//        producerService.sendMessage(topicInfo, kafkaTest, kafkaTest.getNumber());
//    }
//}